<?php
require 'sql.class.php';

// 添加数据()
if ($_GET["type"] == 0) {
	echo "这是添加数据";

	$classId = $_POST["classId"];
	$title = $_POST["title"];
	$content = $_POST["content"];
	$memberId = $_POST["memberId"];
	$thumb = $_FILES["thumb"];

	addContentInfo($classId, $title, $content, $memberId, $thumb);
}

// 修改数据
if ($_GET["type"] == 1) {
	echo "开始修改数据";
	$id = $_POST["id"];
	$classId = $_POST["classId"];
	$title = $_POST["title"];
	$content = $_POST["content"];
	$memberId = $_POST["memberId"];
	$thumb = $_POST["thumb"];

	editContentInfo($id, $classId, $title, $content, $memberId, $thumb);
}

// 删除
if ($_GET["type"] == 2) {
	echo "删除";
}